Integrand size = 21, antiderivative size = 95 \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=-a b e x-\frac {b^2 e (c+d x) \arctan (c+d x)}{d}+\frac {e (a+b \arctan (c+d x))^2}{2 d}+\frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}+\frac {b^2 e \log \left (1+(c+d x)^2\right )}{2 d} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5151, 12, 4946, 5036, 4930, 266, 5004} \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=\frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}+\frac {e (a+b \arctan (c+d x))^2}{2 d}-a b e x-\frac {b^2 e (c+d x) \arctan (c+d x)}{d}+\frac {b^2 e \log \left ((c+d x)^2+1\right )}{2 d} \]
[In]
[Out]
Rule 12
Rule 266
Rule 4930
Rule 4946
Rule 5004
Rule 5036
Rule 5151
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int e x (a+b \arctan (x))^2 \, dx,x,c+d x\right )}{d} \\ & = \frac {e \text {Subst}\left (\int x (a+b \arctan (x))^2 \, dx,x,c+d x\right )}{d} \\ & = \frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}-\frac {(b e) \text {Subst}\left (\int \frac {x^2 (a+b \arctan (x))}{1+x^2} \, dx,x,c+d x\right )}{d} \\ & = \frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}-\frac {(b e) \text {Subst}(\int (a+b \arctan (x)) \, dx,x,c+d x)}{d}+\frac {(b e) \text {Subst}\left (\int \frac {a+b \arctan (x)}{1+x^2} \, dx,x,c+d x\right )}{d} \\ & = -a b e x+\frac {e (a+b \arctan (c+d x))^2}{2 d}+\frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}-\frac {\left (b^2 e\right ) \text {Subst}(\int \arctan (x) \, dx,x,c+d x)}{d} \\ & = -a b e x-\frac {b^2 e (c+d x) \arctan (c+d x)}{d}+\frac {e (a+b \arctan (c+d x))^2}{2 d}+\frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}+\frac {\left (b^2 e\right ) \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d} \\ & = -a b e x-\frac {b^2 e (c+d x) \arctan (c+d x)}{d}+\frac {e (a+b \arctan (c+d x))^2}{2 d}+\frac {e (c+d x)^2 (a+b \arctan (c+d x))^2}{2 d}+\frac {b^2 e \log \left (1+(c+d x)^2\right )}{2 d} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.13 \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=\frac {e \left (a (c+d x) (-2 b+a c+a d x)+2 b \left (-b (c+d x)+a \left (1+c^2+2 c d x+d^2 x^2\right )\right ) \arctan (c+d x)+b^2 \left (1+c^2+2 c d x+d^2 x^2\right ) \arctan (c+d x)^2+b^2 \log \left (1+(c+d x)^2\right )\right )}{2 d} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.19
method | result | size |
derivativedivides | \(\frac {\frac {e \,a^{2} \left (d x +c \right )^{2}}{2}+e \,b^{2} \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )^{2}}{2}+\frac {\arctan \left (d x +c \right )^{2}}{2}-\left (d x +c \right ) \arctan \left (d x +c \right )+\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )+2 e a b \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}+\frac {\arctan \left (d x +c \right )}{2}\right )}{d}\) | \(113\) |
default | \(\frac {\frac {e \,a^{2} \left (d x +c \right )^{2}}{2}+e \,b^{2} \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )^{2}}{2}+\frac {\arctan \left (d x +c \right )^{2}}{2}-\left (d x +c \right ) \arctan \left (d x +c \right )+\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )+2 e a b \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}+\frac {\arctan \left (d x +c \right )}{2}\right )}{d}\) | \(113\) |
parts | \(e \,a^{2} \left (\frac {1}{2} d \,x^{2}+c x \right )+\frac {e \,b^{2} \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )^{2}}{2}+\frac {\arctan \left (d x +c \right )^{2}}{2}-\left (d x +c \right ) \arctan \left (d x +c \right )+\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {2 e a b \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}+\frac {\arctan \left (d x +c \right )}{2}\right )}{d}\) | \(117\) |
parallelrisch | \(\frac {d^{3} e \,b^{2} \arctan \left (d x +c \right )^{2} x^{2}+2 x^{2} \arctan \left (d x +c \right ) a b \,d^{3} e +2 c e \,b^{2} \arctan \left (d x +c \right )^{2} x \,d^{2}+x^{2} a^{2} d^{3} e +4 x \arctan \left (d x +c \right ) a b c \,d^{2} e +\arctan \left (d x +c \right )^{2} b^{2} c^{2} d e -2 x \arctan \left (d x +c \right ) b^{2} d^{2} e +2 x \,a^{2} c \,d^{2} e +2 \arctan \left (d x +c \right ) a b \,c^{2} d e -2 x a b \,d^{2} e +e \,b^{2} \arctan \left (d x +c \right )^{2} d -2 \arctan \left (d x +c \right ) b^{2} c d e -5 a^{2} c^{2} d e +e \,b^{2} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) d +2 \arctan \left (d x +c \right ) a b d e +4 a b c d e -d e \,a^{2}}{2 d^{2}}\) | \(245\) |
risch | \(-\frac {e \,b^{2} \left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) \ln \left (1+i \left (d x +c \right )\right )^{2}}{8 d}+\frac {b e \left (-2 i a \,d^{2} x^{2}+b \,d^{2} x^{2} \ln \left (1-i \left (d x +c \right )\right )-4 i a c d x +2 b c d x \ln \left (1-i \left (d x +c \right )\right )+2 i b d x +\ln \left (1-i \left (d x +c \right )\right ) b \,c^{2}+b \ln \left (1-i \left (d x +c \right )\right )\right ) \ln \left (1+i \left (d x +c \right )\right )}{4 d}-\frac {e d \,b^{2} x^{2} \ln \left (1-i \left (d x +c \right )\right )^{2}}{8}+\frac {i e d a b \,x^{2} \ln \left (1-i \left (d x +c \right )\right )}{2}-\frac {e \,b^{2} c x \ln \left (1-i \left (d x +c \right )\right )^{2}}{4}+i e a b c x \ln \left (1-i \left (d x +c \right )\right )-\frac {e \,b^{2} c^{2} \ln \left (1-i \left (d x +c \right )\right )^{2}}{8 d}-\frac {i e \,b^{2} x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {e \,a^{2} d \,x^{2}}{2}+\frac {e a b \,c^{2} \arctan \left (d x +c \right )}{d}+e \,a^{2} c x -\frac {e \,b^{2} c \arctan \left (d x +c \right )}{d}-\frac {e \,b^{2} \ln \left (1-i \left (d x +c \right )\right )^{2}}{8 d}-a b e x +\frac {e a b \arctan \left (d x +c \right )}{d}+\frac {e \,b^{2} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d}\) | \(393\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.58 \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=\frac {a^{2} d^{2} e x^{2} + 2 \, {\left (a^{2} c - a b\right )} d e x + b^{2} e \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (b^{2} c^{2} + b^{2}\right )} e\right )} \arctan \left (d x + c\right )^{2} + 2 \, {\left (a b d^{2} e x^{2} + {\left (2 \, a b c - b^{2}\right )} d e x + {\left (a b c^{2} - b^{2} c + a b\right )} e\right )} \arctan \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 15.31 (sec) , antiderivative size = 240, normalized size of antiderivative = 2.53 \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=\begin {cases} a^{2} c e x + \frac {a^{2} d e x^{2}}{2} + \frac {a b c^{2} e \operatorname {atan}{\left (c + d x \right )}}{d} + 2 a b c e x \operatorname {atan}{\left (c + d x \right )} + a b d e x^{2} \operatorname {atan}{\left (c + d x \right )} - a b e x + \frac {a b e \operatorname {atan}{\left (c + d x \right )}}{d} + \frac {b^{2} c^{2} e \operatorname {atan}^{2}{\left (c + d x \right )}}{2 d} + b^{2} c e x \operatorname {atan}^{2}{\left (c + d x \right )} - \frac {b^{2} c e \operatorname {atan}{\left (c + d x \right )}}{d} + \frac {b^{2} d e x^{2} \operatorname {atan}^{2}{\left (c + d x \right )}}{2} - b^{2} e x \operatorname {atan}{\left (c + d x \right )} + \frac {b^{2} e \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d} + \frac {b^{2} e \operatorname {atan}^{2}{\left (c + d x \right )}}{2 d} - \frac {i b^{2} e \operatorname {atan}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\c e x \left (a + b \operatorname {atan}{\left (c \right )}\right )^{2} & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (89) = 178\).
Time = 0.99 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.29 \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=\frac {1}{2} \, a^{2} d e x^{2} + {\left (x^{2} \arctan \left (d x + c\right ) - d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} a b d e + a^{2} c e x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} a b c e}{d} + \frac {b^{2} e \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (b^{2} c^{2} + b^{2}\right )} e\right )} \arctan \left (d x + c\right )^{2} - 2 \, {\left (b^{2} d e x + b^{2} c e\right )} \arctan \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
\[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx=\int { {\left (d e x + c e\right )} {\left (b \arctan \left (d x + c\right ) + a\right )}^{2} \,d x } \]
[In]
[Out]
Time = 1.83 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.27 \[ \int (c e+d e x) (a+b \arctan (c+d x))^2 \, dx={\mathrm {atan}\left (c+d\,x\right )}^2\,\left (\frac {e\,b^2\,c^2+e\,b^2}{2\,d}+b^2\,c\,e\,x+\frac {b^2\,d\,e\,x^2}{2}\right )-x\,\left (a\,e\,\left (b-3\,a\,c\right )+2\,a^2\,c\,e\right )-d^2\,\mathrm {atan}\left (c+d\,x\right )\,\left (\frac {x\,\left (b^2\,e-2\,a\,b\,c\,e\right )}{d^2}-\frac {a\,b\,e\,x^2}{d}\right )+\frac {b^2\,e\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d}+\frac {a^2\,d\,e\,x^2}{2}+\frac {b\,e\,\mathrm {atan}\left (\frac {b\,c\,e\,\left (a\,c^2-b\,c+a\right )+b\,d\,e\,x\,\left (a\,c^2-b\,c+a\right )}{-e\,b^2\,c+a\,e\,b\,c^2+a\,e\,b}\right )\,\left (a\,c^2-b\,c+a\right )}{d} \]
[In]
[Out]